import request from '@/utils/request'

// 查询问卷列表
export function listSurvey(query) {
    return request({
        url: '/questionnaire/survey/list',
        method: 'get',
        params: query
    })
}

// 查询问卷所有列表
export function listAllSurvey(query) {
    return request({
        url: '/questionnaire/survey/listAll',
        method: 'get',
        params: query
    })
}

// 查询问卷详细
export function getSurvey(id) {
    return request({
        url: '/questionnaire/survey/' + id,
        method: 'get'
    })
}

// 新增问卷
export function addSurvey(data) {
    return request({
        url: '/questionnaire/survey',
        method: 'post',
        data: data
    })
}

// 修改问卷
export function updateSurvey(data) {
    return request({
        url: '/questionnaire/survey',
        method: 'put',
        data: data
    })
}

// 删除问卷
export function delSurvey(id) {
    return request({
        url: '/questionnaire/survey/' + id,
        method: 'delete'
    })
}
